Skip to content

Optimize Nearby labels#6724

Open
rovertrack wants to merge 2 commits intocommons-app:mainfrom
rovertrack:optimize
Open

Optimize Nearby labels#6724
rovertrack wants to merge 2 commits intocommons-app:mainfrom
rovertrack:optimize

Conversation

@rovertrack
Copy link
Contributor

@rovertrack rovertrack commented Mar 10, 2026

Description (required)

Fixes #6723

What changes did you make and why?

  • Hold QIDs as integers rather than Strings.
  • Have them already sorted in the resource XML and use binary search to retrieve them. done but we stil have on step to merge all sorted array via sparsearray a tempmap then separate into ids and labels arrays which are then used while filtering
  • That PR should modify the XML files to sort the QIDs. not required stil done
  • That PR sorts the QIDs dynamically. Instead we should consider the array as sorted already. Some kind of static check should be done at build time, perhaps as a unit test. (not required i guess as we are not depended on sorted list from the array resource file )

@rovertrack
Copy link
Contributor Author

rovertrack commented Mar 10, 2026

@nicolas-raoul this is my approach and less complexity compared to #6722 ,

  • for reducing the apk size we must convert the int array into byte array at build time and reuse when app loads instead of the whole int array from resource file (this is only if we really need that kind of optimization as there might be some complexity with that process)

@rovertrack
Copy link
Contributor Author

@nicolas-raoul is this implementation not good ?

@github-actions
Copy link

✅ Generated APK variants!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize Nearby labels for runtime memory and APK size

2 participants